1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

Reference | var()


Syntax
var(name, type, default, min, max)

DescriptionThe variables sheet creates connections between a variable and a user interface control, such as a slider, textfield or check box. The most convenient way of creating variables is through the Python > Variables menu. Variables created like this become part of the global namespace, meaning you can access them just like any other variable.
Tutorial Variables


Example
var("amount", NUMBER, 30, 0, 100)
 
background(0.1, 0, 0.0)
for i in range(int(amount)):
    rotate(15)
    image("10.png", 5, 5, alpha=0.25)